#-*- coding: utf-8 -*-
import sys
import math
import time
import random

def bubble_sort(A):
    for i in range(0, len(A)):
        j = len(A)-1
        while j > i:
            
            if A[j] < A[j-1]:
                a = A[j]
                A[j], A[j-1] = A[j-1], A[j]
                
                pass
            j = j - 1

N = 500
c = 0

for k in range(0, N, 50):
    b = 0.0
    for v in range(0, 50):
        A = [random.randint(0,99) for k in range(k)]
        t1 = time.time()
        bubble_sort(A)
        t2 = time.time()
        b += t2-t1
        pass

    print k, b / 50

